using System;

namespace ProtoScratch.Common
{
	/// <summary>
	/// This exception is used for any exception out of protoscratch that is related to
	/// the protoscratch protocol in particular.
	/// </summary>
	public class ScratchException : Exception
	{
		public enum eType
		{
			InvalidOperation,
			EndOfData,
			ReadOnly,
			InvalidKey,
			Timeout,
			MalformedFrame,
		}
		
		public readonly eType Type;
		
		public ScratchException(eType Type, string Text) : base(Text)
		{
			this.Type = Type;
		}
	}
}

